﻿<div ng-controller="chargeHtmlController">
	<div class="wrapper border-bottom white-bg page-heading">
		<div class="col-lg-pull-12">
			<ol class="breadcrumb">
				<li>MO单据</li>
			</ol>
		</div>
	</div>
	<form class="form-horizontal row">
		<!--<div class="form-group">
		<div class="col-sm-4">
			<label class="col-sm-4 control-label">订单号</label>
			<div class="col-sm-8">
				<input name="order_no" type="text" class="form-control input-sm" ng-model="query.order_no">
			</div>
		</div>
		<div class="col-sm-4">
			<label class="col-sm-4 control-label">姓名/手机</label>
			<div class="col-sm-8">
				<input name="q" type="text" class="form-control input-sm" ng-model="query.q">
			</div>
		</div>
		<div class="col-sm-4">
			<label class="col-sm-4 control-label">通道</label>
			<div class="col-sm-8">
				<select class="form-control input-sm" ng-model="query.pay_channel">
					<option value="0">全部</option>
					<option value="30">TenSub(30)</option>
				</select>
			</div>
		</div>
	</div>
	<div class="form-group">
		<div class="col-sm-4">
			<label class="col-sm-4 control-label">开始时间</label>
			<div class="col-sm-8">
				<div date class="input-group date">
					<input class="form-control input-sm" ng-model="query.start_time">
					<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
				</div>
			</div>
		</div>
		<div class="col-sm-4">
			<label class="col-sm-4 control-label">结束时间</label>
			<div class="col-sm-8">
				<div date class="input-group date">
					<input class="form-control input-sm" ng-model="query.end_time">
					<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
				</div>
			</div>
		</div>
	</div>
	<div class="form-group">
		<div class="col-sm-2"></div>
		<div class="col-sm-10">
			<a class="btn btn-primary btn-sm" ng-click="search()"><i class="fa fa-search"></i> 查询</a>
			<a class="btn btn-primary btn-sm" ng-click="search()"><i class="fa fa-refresh"></i> 刷新</a>
			<a class="btn btn-primary btn-sm" ng-click="html_dels()"><i class="fa fa-trash"></i> 删除选中</a>
			<a class="btn btn-primary btn-sm" ng-click="html_del_choose()"><i class="fa fa-trash"></i> 删除选择</a>
		</div>
	</div>-->
		<div class="col-sm-4">
			<label class="col-sm-4 control-label">姓名/手机</label>
			<div class="col-sm-8">
				<input name="q" type="text" class="form-control input-sm" ng-model="query.q">
			</div>
		</div>
		<div class="col-sm-8">
			<a class="btn btn-primary btn-sm" ng-click="search()"><i class="fa fa-search"></i> 查询</a>
			<a class="btn btn-primary btn-sm" ng-click="search()"><i class="fa fa-refresh"></i> 刷新</a>
			<a class="btn btn-primary btn-sm" ng-click="html_dels()"><i class="fa fa-trash"></i> 删除选中</a>
			<a class="btn btn-primary btn-sm" ng-click="html_del_choose()"><i class="fa fa-trash"></i> 删除选择</a>
		</div>
	</form>
	<table class="table table-hover m-t-md">
		<thead>
			<tr style="background-color: #f7f7f9;">
				<th width="60">全选 <input type="checkbox" ng-click="choose_all()" ng-checked="del_ids.length==query.size"></th>
				<th>订单号</th>
				<th>手机号</th>
				<th>账号</th>
				<th>姓名</th>
				<th>身份证</th>
				<th>支付金额(分)</th>
				<th>手续费（分）</th>
				<th width="185">操作</th>
			</tr>
		</thead>
		<tbody ng-repeat="item in model.rows">
			<tr ng-dblclick="item.show=!item.show">
				<td><input name="id" ng-true-value="{{item.id}}" type="checkbox" ng-click="choose($event,item.id)" ng-checked="del_ids.indexOf(item.id)>-1"></td>
				<td>{{item.data.orderNo}}</td>
				<td>{{item.mobile}}</td>
				<td>{{item.account_no}}</td>
				<td>{{item.account_name}}</td>
				<td>{{item.id_card}}</td>
				<td>{{item.amount}}</td>
				<td>{{item.rateAmount}}</td>
				<td>
					<button class="btn btn-primary btn-xs" ng-click="html_first(item.id)" btn-loading="psdisabled" ng-if="item.status!=2 && item.pay_type==null"
							loading-text="处理中..." ng-disabled="psdisabled">
						<i class="fa fa-credit-card"></i> 代付
					</button>
					<button class="btn btn-primary btn-xs" ng-click="html_del(item.id)" btn-loading="psdisabled" ng-if="item.is_finish == 1 || item.pay_type==null" loading-text="处理" ng-disabled="psdisabled">
						<i class="fa fa-volume-up"></i> 删除
					</button>
				</td>
			</tr>
		</tbody>
	</table>
	<div class="row">
		<div class="col-md-12">
			<uib-pagination total-items="model.total_result" items-per-page="model.size" ng-model="model.page" num-pages="model.total_pages"
							ng-change="search_page(model.page)" class="pagination-sm" boundary-links="true" boundary-link-numbers="true" max-size="20"
							previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
			<span class="pull-right" style="margin: 30px 0px 20px 0px">共{{model.total_result}} 当前：{{model.page}}/{{model.total_pages}}</span>
		</div>
	</div>
</div>
